package com.macower.common.task;

import com.macower.common.util.DBManager;

public class MemberTask {
	
	/**
	 * 同步会员信息（积分）
	 */
	public void updateMemberInfo(){
		System.out.println("-----------updateMemberInfo-----------");
		DBManager dbManager = new DBManager() ;
		String updateSql ="update tb_member tm set integral =(select SUM(t.discount_total_price) from tb_order t where t.order_status in(2,3,4,8) and t.member_id = tm.id)";
		dbManager.executeUpdate(updateSql) ;
		dbManager.close() ;
	}

}
